﻿using System;
using System.Threading.Tasks;

namespace EasySocket
{
    public interface IEasySocketTcpServer : IDisposable
    {

        /// <summary>
        /// 客户端连接数
        /// </summary>
        int ClientCounts { get; }

        /// <summary>
        /// 启动
        /// </summary>
        Task StartAsync(EasySocketOption option);

        /// <summary>
        /// 发送数据
        /// </summary>
        /// <param name="sessionID"></param>
        /// <param name="data"></param>
        Task SendAsync(string sessionID, byte[] data);
    }
}
